package cn.bdqn.mybatis.dao;

import cn.bdqn.mybatis.pojo.UserAddress;

import java.io.IOException;
import java.util.List;

public interface UserAddressDao {
    /**
     * 查询所有的地址信息
     * @return
     */
    public List<UserAddress> getAll() throws RuntimeException;

    /**
     * 通过id查询用户地址信息
     * @param id
     * @return
     */
    public UserAddress getUserAddressById(Integer id) throws RuntimeException;

    /**
     * 通过联系人姓名查询该用户地址信息
     * @param contact
     * @return
     */
    public UserAddress getUserAddressByContact(String contact) throws RuntimeException;

    /**
     * 添加用户地址信息
     * @param userAddress
     * @return
     */
    public int AddUserAddress(UserAddress userAddress) throws RuntimeException;

    /**
     * 修改用户地址信息
     * @param userAddress
     * @return
     */
    public int updateUserAddress(UserAddress userAddress) throws RuntimeException;

    /**
     * 删除用户地址信息
     * @param ids
     * @return
     */
    public int deleteUserAddress(List<Integer> ids) throws RuntimeException;

}
